From: Jo-Philipp Wich Date: Mon, 7 Aug 2023 21:36:36 +0000 (+0200) Subject: luci-base: runtime.uc: fix error500() invocation on theme failure X-Git-Url: http://git.openwrt.org/%22https:/collectd.org//%22/%22https:/collectd.org/%22?a=commitdiff_plain;h=9763e3e9d320b5128f374117d0ff95ab8cc7f626;p=project%2Fluci.git luci-base: runtime.uc: fix error500() invocation on theme failure In case no single theme could be loaded successfully, the runtime class failed to properly invoke the `error500()` method, which is only available through the passed environment at this point. Signed-off-by: Jo-Philipp Wich --- diff --git a/modules/luci-base/ucode/runtime.uc b/modules/luci-base/ucode/runtime.uc index e460127e2c..f14bf74480 100644 --- a/modules/luci-base/ucode/runtime.uc +++ b/modules/luci-base/ucode/runtime.uc @@ -173,7 +173,7 @@ export default function(env) { } if (!media) - error500(`Unable to render any theme header template, last error was:\n${status}`); + env.dispatcher.error500(`Unable to render any theme header template, last error was:\n${status}`); } self.env.media = media;